home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / commodity / screentab_1_20.lha / ScreenTab / English / Install_English < prev    next >
Encoding:
Text File  |  1994-12-20  |  6.8 KB  |  207 lines

  1. ; Installation-Script for ScreenTab V1.20
  2. ; Author: Michael Link
  3. ; Begin       : 28.10.94
  4. ; Last change : 19.12.94
  5.  
  6. (set DIRHELP (cat "You must enter the name of the directory, in which\n"
  7.                   "ScreenTab should be installed.\n\n"
  8.                   "If you want ScreenTab to be active everytime you\n"
  9.                   "start the computer, enter the directory\n"
  10.                   "\"SYS:WBStartup\", which is the default directory."
  11.              )
  12. )
  13.  
  14. (set DIR_REQUEST (cat "Please enter the destination directory\n"
  15.                       "for ScreenTab"
  16.                  )
  17. )
  18.  
  19. (set WHICH_HOTKEY (cat "\n\nWith which key combination shall the\n"
  20.                        "preferences be called ?"
  21.                   )
  22. )
  23.  
  24. (set WHICH_KEY    (cat "\n\nWith which key combination shall the\n"
  25.                        "screens be switched ?\n\n"
  26.                        "(Don't use any of the SHIFT-Keys, because\n"
  27.                        "ScreenTab needs them for back-switching !)"
  28.                   )
  29. )
  30.  
  31. (set WHICH_PRIORITY "\n\nEnter the task priority for ScreenTab ?")
  32.  
  33. (set COPY_PREFS     "\n\nCopying preferences file ...")
  34.  
  35. (set OVERWRITE    (cat "\n\nThere already exists a ScreenTab\n"
  36.                        "preferences file.\n"
  37.                        "Shall I overwrite it ?"
  38.                   )
  39. )
  40.  
  41. (set VERSION_PROMPT (cat "\n\nThere's an older preferences file installed\n"
  42.                          "on your system. If you want to use these\n"
  43.                          "preferences, they must be converted.\n\n"
  44.                          "Do you want to do this ?"
  45.                     )
  46. )
  47.  
  48. (set PLEASE_RESET   (cat "\n\nIf you want to activate the new ScreenTab\n"
  49.                          "version, you have to reset your computer.\n\n"
  50.                          "Have fun with ScreenTab !"
  51.                     )
  52. )  
  53.  
  54. (set vernum (getversion "locale.library" (resident)))
  55. (set ver (shiftright vernum 16))
  56.  
  57.  
  58. ; ***********************************************************************
  59. ; *                                                                     *
  60. ; * Request for the destination directory                               *
  61. ; *                                                                     *
  62. ; ***********************************************************************
  63.  
  64. (set DIR (askdir (prompt DIR_REQUEST)
  65.                  (help DIRHELP)
  66.                  (default "SYS:WBStartup")
  67.          )
  68. )
  69.  
  70. (set @default-dest DIR)
  71.  
  72.  
  73. ; ***********************************************************************
  74. ; *                                                                     *
  75. ; * Asking for the tool-types                                           *
  76. ; *                                                                     *
  77. ; ***********************************************************************
  78.  
  79. (set HOTKEY (askstring (prompt WHICH_HOTKEY)
  80.                        (help @askstring-help)
  81.                        (default "ctrl alt s")
  82.             )
  83. )
  84.  
  85. (set SWITCHKEY (askstring (prompt WHICH_KEY)
  86.                           (help @askstring-help)
  87.                           (default "LCommand Tab")
  88.                )
  89. )  
  90.  
  91. (set TOOLPRI (askstring (prompt WHICH_PRIORITY)
  92.                         (help @askstring-help)
  93.                         (default "5")
  94.              )
  95. )
  96.  
  97. (tooltype (prompt "Writing tool-type HOTKEY ...")
  98.           (help)
  99.           (dest "/ScreenTab")
  100.           (settooltype "CX_POPKEY" HOTKEY)
  101. )
  102.  
  103. (tooltype (prompt "Writing tool-Type SWITCHKEY ...")
  104.           (help)
  105.           (dest "/ScreenTab")
  106.           (settooltype "SWITCHKEY" SWITCHKEY)
  107. )   
  108.  
  109. (tooltype (prompt "Writing tool-Type TOOLPRI ...")
  110.           (help)
  111.           (dest "/ScreenTab")
  112.           (settooltype "TOOLPRI" TOOLPRI)
  113. )   
  114.  
  115. (copyfiles (prompt ("Copying ScreenTab to %s" DIR) )
  116.            (help @copyfiles-help)
  117.            (source "/ScreenTab")
  118.            (dest DIR)
  119.            (infos)
  120. )
  121.  
  122.  
  123. ; ***********************************************************************
  124. ; *                                                                     *
  125. ; * Checks for an existing preferences file and                         *
  126. ; * asks for a conversion                                               *
  127. ; *                                                                     *
  128. ; ***********************************************************************
  129.  
  130. (if (= (exists "ENVARC:ScreenTab.prefs") 1)
  131.     (
  132.         (if (= (run "GetSCRTVersion" (safe) ) 2)
  133.             (
  134.                 (if (askbool (prompt VERSION_PROMPT)
  135.                              (help)
  136.                              (default 1)
  137.                     )
  138.                     (if (= (run "PrefsConvert" (safe) ) 0)
  139.                         (copyfiles (prompt)
  140.                                    (help)
  141.                                    (source "T:SCRT.TMP")
  142.                                    (dest "ENVARC:")
  143.                                    (newname "ScreenTab.prefs")
  144.                         )
  145.                         (message "Error during conversion !!!")
  146.                     )
  147.                 )
  148.             )
  149.             (
  150.                 (if (askbool (prompt OVERWRITE)
  151.                              (help)
  152.                              (default 0)
  153.                     )
  154.                     (copyfiles (prompt COPY_PREFS)
  155.                                (help)
  156.                                (source "/ScreenTab.prefs")
  157.                                (dest "ENVARC:")
  158.                     )
  159.                 )
  160.             )
  161.         )
  162.     )
  163.     (
  164.         (copyfiles (prompt COPY_PREFS)
  165.                    (help)
  166.                    (source "/ScreenTab.prefs")
  167.                    (dest "ENVARC:")
  168.         )
  169.     )
  170. )
  171.  
  172.  
  173. ; ***********************************************************************
  174. ; *                                                                     *
  175. ; * Installation of the catalogs                                        *
  176. ; *                                                                     *
  177. ; ***********************************************************************
  178.  
  179. (if (>= ver 38)
  180.     (
  181.         (set CATALOGS (askoptions (prompt (cat "\nWhich language catalogs\n"
  182.                                                "shall be installed ?"))
  183.                                   (help)
  184.                                   (choices "German" "Swedish")
  185.                                   (default 0)
  186.                       )
  187.         )
  188.         (if (BITAND CATALOGS 1)
  189.             (copyfiles (prompt "Copying German catalog ...")
  190.                        (help)
  191.                        (source "/catalogs/deutsch/ScreenTab.catalog")
  192.                        (dest   "LOCALE:Catalogs/deutsch")
  193.             )
  194.         )
  195.         (if (BITAND CATALOGS 2)
  196.             (copyfiles (prompt "Copying Swedish catalog ...")
  197.                        (help)
  198.                        (source "/catalogs/svenska/ScreenTab.catalog")
  199.                        (dest   "LOCALE:Catalogs/svenska")
  200.             )
  201.         )
  202.     )
  203. )
  204.  
  205. (message PLEASE_RESET)
  206.  
  207.